<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <title>微信登录</title>
</head>
 
<body>
    <script>
    function getUrlParam(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r!=null) return unescape(r[2]); return null;
    }
    if(getUrlParam("state")==1){//8888.shinehao.net
    	window.location.href="https://8888.shinehao.net/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code");
    }
	if(getUrlParam("state")==2){//www.shinehao.net
		window.location.href="https://www.shinehao.net/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code");
    }
	if(getUrlParam("state")==3){//www.shinehao.com.cn
		window.location.href="https://www.shinehao.com.cn/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code");
	}
	if(getUrlParam("state")==4){//www.shinehao.com.cn
		window.location.href="https://www.aieyewear.com.cn/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code");
	}
	
	//看板
	if(getUrlParam("state")==5){//8888.shinehao.net
    	window.location.href="https://8888.shinehao.net/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code")+"&state=datav";
    }
	if(getUrlParam("state")==6){//www.shinehao.net
		window.location.href="https://www.shinehao.net/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code")+"&state=datav";
    }
	if(getUrlParam("state")==7){//www.shinehao.com.cn
		window.location.href="https://www.shinehao.com.cn/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code")+"&state=datav";
	}
	if(getUrlParam("state")==8){//www.aieyewear.com.cn
		window.location.href="https://www.aieyewear.com.cn/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code")+"&state=datav";
	}
	
	//默认本域名
	if(getUrlParam("state")==100){
		window.location.href=window.location.protocol+"//"+window.location.host+"/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code");
	}
	if(getUrlParam("state")==1000){
		window.location.href=window.location.protocol+"//"+window.location.host+"/weixin/user/getUserLoginByScanQrcode?code="+getUrlParam("code")+"&state=datav";
	}
    </script>
</body>
 
</html>
